<template>
<view>
<text>{{ count }}</text>
<button @click="increment">增加</button>
</view>
</template>
<script setup>
import { ref, onMounted } from 'vue';

const count = ref(0);

onMounted(() => {
console.log('组件已挂载');
});

function increment() {
count.value++;
}
</script>

